
Imports System.Xml
Imports System.IO.StreamWriter



Public Class FrmPortComs

    Private Sub FrmPortComs_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'Dim xmlDoc As XmlDataDocument = New XmlDataDocument(Data)
        'xmlDoc.Load("C:\XMLDocument.xml")
        'xmlDoc.Save("c:\test.xml")


        For i As Integer = 0 To My.Computer.Ports.SerialPortNames.Count - 1
            CmbPuertos.Items.Add(My.Computer.Ports.SerialPortNames(i))
        Next

        CmbMovil.Items.Add(1)
        CmbMovil.Items.Add(2)
        CmbMovil.Items.Add(3)

    End Sub

    Private Sub BtnConectar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnConectar.Click

        PortCOM = CmbPuertos.Text
        IDMovil = Convert.ToInt16(CmbMovil.Text)

        Dim FormularioPrincipal As New FrmPrincipal
        FormularioPrincipal.Show()

        Me.Hide()


    End Sub
End Class